/*
 * Copyright (C) 2017-2021
 * All rights reserved, Designed By
 * Copyright authorization contact 18814114118
 */
package com.shop.cereshop.app.dao.recommend;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shop.cereshop.app.page.recommend.RecommendCommentVO;
import com.shop.cereshop.app.page.recommend.RecommendPageVO;
import com.shop.cereshop.app.param.recommend.RecommendLikesParam;
import com.shop.cereshop.commons.domain.recommend.CereRecommendLikes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CereRecommendLikesDAO extends BaseMapper<CereRecommendLikes> {

    Long findUserUnreadLikeCount(@Param("userId") Long userId);

    boolean updateCommentLikeIsReadByUserId(Long buyerUserId);

    int updateLikeIsRead();

    void saveLikes(CereRecommendLikes likes);

    void deleteLikes(RecommendLikesParam param);

    CereRecommendLikes getLikes(RecommendLikesParam param);

    List<RecommendPageVO> getLikeRecommendPage(@Param("buyerUserId") Long buyerUserId, @Param("recommendId") Long recommendId, @Param("blockedUserIds") List<Long> blockedUserIds);

    void deleteByRecommendId(Long recommendId);

    List<Long> selectLikesIds();

    List<RecommendCommentVO> getLikeStatusAndCount(@Param("buyerUserId")Long buyerUserId,
                                                   @Param("list") List<Long> recommendCommentIds,
                                                   @Param("likeType") Integer likeType);

    Integer deleteUserInfo(@Param("recommendIds") List<Long> recommendIds, @Param("buyerUserId") Long buyerUserId);

    List<Long> selectCollectIdsByUserId(@Param("buyerUserId") Long buyerUserId);

}
